package com.zhiyou100.taxi.entity;

import java.io.Serializable;

public class Customer implements Serializable {
    public Customer() {
    }

    public Customer(String customerId, String customerName, String customerSex,
                    String customerPhone, String customerPid, String customerJob,
                    String customerAddress, String customerPhoto) {
        this.customerId = customerId;
        this.customerName = customerName;
        this.customerSex = customerSex;
        this.customerPhone = customerPhone;
        this.customerPid = customerPid;
        this.customerJob = customerJob;
        this.customerAddress = customerAddress;
        this.customerPhoto = customerPhoto;
    }

    private String customerId;

    private String customerName;

    private String customerSex;

    private String customerPhone;

    private String customerPid;

    private String customerJob;

    private String customerAddress;

    private String customerPhoto;

    private static final long serialVersionUID = 1L;

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId == null ? null : customerId.trim();
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName == null ? null : customerName.trim();
    }

    public String getCustomerSex() {
        return customerSex;
    }

    public void setCustomerSex(String customerSex) {
        this.customerSex = customerSex == null ? null : customerSex.trim();
    }

    public String getCustomerPhone() {
        return customerPhone;
    }

    public void setCustomerPhone(String customerPhone) {
        this.customerPhone = customerPhone == null ? null : customerPhone.trim();
    }

    public String getCustomerPid() {
        return customerPid;
    }

    public void setCustomerPid(String customerPid) {
        this.customerPid = customerPid == null ? null : customerPid.trim();
    }

    public String getCustomerJob() {
        return customerJob;
    }

    public void setCustomerJob(String customerJob) {
        this.customerJob = customerJob == null ? null : customerJob.trim();
    }

    public String getCustomerAddress() {
        return customerAddress;
    }

    public void setCustomerAddress(String customerAddress) {
        this.customerAddress = customerAddress == null ? null : customerAddress.trim();
    }

    public String getCustomerPhoto() {
        return customerPhoto;
    }

    public void setCustomerPhoto(String customerPhoto) {
        this.customerPhoto = customerPhoto == null ? null : customerPhoto.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Customer other = (Customer) that;
        return (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()))
            && (this.getCustomerName() == null ? other.getCustomerName() == null : this.getCustomerName().equals(other.getCustomerName()))
            && (this.getCustomerSex() == null ? other.getCustomerSex() == null : this.getCustomerSex().equals(other.getCustomerSex()))
            && (this.getCustomerPhone() == null ? other.getCustomerPhone() == null : this.getCustomerPhone().equals(other.getCustomerPhone()))
            && (this.getCustomerPid() == null ? other.getCustomerPid() == null : this.getCustomerPid().equals(other.getCustomerPid()))
            && (this.getCustomerJob() == null ? other.getCustomerJob() == null : this.getCustomerJob().equals(other.getCustomerJob()))
            && (this.getCustomerAddress() == null ? other.getCustomerAddress() == null : this.getCustomerAddress().equals(other.getCustomerAddress()))
            && (this.getCustomerPhoto() == null ? other.getCustomerPhoto() == null : this.getCustomerPhoto().equals(other.getCustomerPhoto()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
        result = prime * result + ((getCustomerName() == null) ? 0 : getCustomerName().hashCode());
        result = prime * result + ((getCustomerSex() == null) ? 0 : getCustomerSex().hashCode());
        result = prime * result + ((getCustomerPhone() == null) ? 0 : getCustomerPhone().hashCode());
        result = prime * result + ((getCustomerPid() == null) ? 0 : getCustomerPid().hashCode());
        result = prime * result + ((getCustomerJob() == null) ? 0 : getCustomerJob().hashCode());
        result = prime * result + ((getCustomerAddress() == null) ? 0 : getCustomerAddress().hashCode());
        result = prime * result + ((getCustomerPhoto() == null) ? 0 : getCustomerPhoto().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", customerId=").append(customerId);
        sb.append(", customerName=").append(customerName);
        sb.append(", customerSex=").append(customerSex);
        sb.append(", customerPhone=").append(customerPhone);
        sb.append(", customerPid=").append(customerPid);
        sb.append(", customerJob=").append(customerJob);
        sb.append(", customerAddress=").append(customerAddress);
        sb.append(", customerPhoto=").append(customerPhoto);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}